<?php
header('Content-type: text/html; charset=utf-8');
if(file_exists('../../environments.php'))
{
	require_once '../../environments.php';
}
else
{
	defined('YII_DEBUG') or define('YII_DEBUG', true);
	defined('YII_ENV') or define('YII_ENV', 'dev');
	define('UPLOAD_PATH', '/app/server/zsmm_image/');
	define('STATIC_IMAGE', 'http://test.image.zhishimama.com/');
	define('STATIC_HOST', 'http://test.static.zhishimama.com/');
}

error_reporting(E_ALL ^ E_NOTICE);


date_default_timezone_set('Asia/Shanghai');

session_start();

define('ROOT_PATH', dirname(dirname(dirname(__FILE__))));
define('WEB_PATH', dirname(__FILE__));


require(__DIR__ . '/../../vendor/autoload.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
require(__DIR__ . '/../../common/config/bootstrap.php');
require(__DIR__ . '/../config/bootstrap.php');

$config = yii\helpers\ArrayHelper::merge(
    require(__DIR__ . '/../../common/config/main.php'),
    require(__DIR__ . '/../config/main.php')
);


$application = new yii\web\Application($config);
$application->run();
